package com.tengfei.main.user.domain.bo.login;

import com.tengfei.common.constant.UserConstants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author feige
 * @version v1.0
 * @date 2022-08-14-14:57
 * @description 用户注册BO
 */

@Data
@ApiModel("用户注册信息业务对象")
public class UserRegisterBo {

    @NotBlank(message = "{姓名不能为空}")
    @Length(min = UserConstants.USERNAME_MIN_LENGTH, max = UserConstants.USERNAME_MAX_LENGTH, message = "{姓名不在合法范围内}")
    @ApiModelProperty(value = "姓名",required = true)
    private String name;

    /**
     * 用户名
     */
    @NotBlank(message = "{用户名不能为空}")
    @Length(min = UserConstants.USERNAME_MIN_LENGTH, max = UserConstants.USERNAME_MAX_LENGTH, message = "{用户名不在合法范围内}")
    @ApiModelProperty(value = "用户名",required = true)
    private String username;

    /**
     * 用户密码
     */
    @NotBlank(message = "{用户密码不能为空}")
    @Length(min = UserConstants.PASSWORD_MIN_LENGTH, max = UserConstants.PASSWORD_MAX_LENGTH, message = "{user.password.length.valid}")
    @ApiModelProperty(value = "用户密码",required = true)
    private String password;

    /**
     * 部门id
     */
    @NotNull(message = "{部门id不能为空}")
    @ApiModelProperty(value = "部门id",required = true)
    private Long deptId;

    /**
     * 电话号码
     */
    @NotEmpty(message = "{电话号码不能为空}")
    @Length(min = 11, max = 11, message = "{电话号码不在合法范围内}")
    @ApiModelProperty(value = "电话号码",required = true)
    private String phoneNumber;

    /**
     * 验证码
     */
    @NotBlank(message = "{验证码不能为空}")
    @ApiModelProperty(value = "验证码",required = true)
    private String code;

    /**
     * 唯一标识
     */
    @NotBlank(message = "{验证码唯一标识不能为空}")
    @ApiModelProperty(value = "验证码唯一标识",required = true)
    private String uuid;


}
